#pragma once
#include "MyDefine.h"
enum EObjectType
{
	NONE = 0,
	RECTANGLE,
	CIRCLE,
	PLANE,
};
enum ECollisionType
{
	NONECOLL = 0,
	LEFT  = 1 << 0,
	RIGHT = 1 << 1,
	TOP = 1 << 2,
	BOTTOM = 1 << 3,
};
class Object
{
protected:
	float m_PositionX, m_PositionY;
	float m_DestPositionX, m_DestPositionY;
	float m_Velocity;
	float m_VelocityX , m_VelocityY;
	EObjectType m_Type;
	int m_Mass;
	bool m_isSelected;

public:
	Object(void);
	Object(float posX, float posY);
	virtual ~Object(void);

	virtual void Render() = 0;
	virtual void Update(float frameTime);
	float GetPosX();
	float GetPosY();
	void SetPosition(float x, float y);
	void SetType(EObjectType type);
	EObjectType GetType();
	//Task 2
	void SetSelect(bool m_isSelected);
	bool IsSelected();
	virtual bool InRect(int posX, int poxY)= 0;
	void SetVelocity(float m_Velocity);
	void SetVelocity(float m_VelocityX, float m_VelocityY);
	void AddMove(float m_deltaX, float m_deltaY);
	void MoveObjectAround(ObjectTouch* m_objectTouch);
	
	void SetDestPosition(float m_PosDestX, float m_PosDestY);
	void DrawFullLine();

	//Task 3
	virtual bool HasCollisionWithObject(Object* object) = 0;
	virtual int  CheckCollisionWithEdge() = 0;
	bool CheckFlag(int flag, int mask);
	
	
};